package com.example.neutonote2.data.model;

import androidx.room.Entity;
import androidx.room.PrimaryKey;
import androidx.room.ColumnInfo;
import java.util.Date;

/**
 * 笔记实体类
 */
@Entity(tableName = "notes")
public class Note {
    @PrimaryKey(autoGenerate = true)
    private int id;

    private String title;
    private String content;
    
    @ColumnInfo(name = "created_time")
    private Date createdTime;
    
    @ColumnInfo(name = "modified_time")
    private Date modifiedTime;
    
    private String category; // 分类：工作、学习、生活等
    
    @ColumnInfo(name = "review_status")
    private String reviewStatus; // 复习状态：待复习、已掌握、需加强
    
    @ColumnInfo(name = "next_review_date")
    private Date nextReviewDate; // 下次复习日期

    public Note(String title, String content, String category) {
        this.title = title;
        this.content = content;
        this.category = category;
        this.createdTime = new Date();
        this.modifiedTime = new Date();
        this.reviewStatus = "待复习";
    }

    // Getters and Setters
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
        this.modifiedTime = new Date(); // 更新修改时间
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
        this.modifiedTime = new Date(); // 更新修改时间
    }

    public Date getCreatedTime() {
        return createdTime;
    }

    public void setCreatedTime(Date createdTime) {
        this.createdTime = createdTime;
    }

    public Date getModifiedTime() {
        return modifiedTime;
    }

    public void setModifiedTime(Date modifiedTime) {
        this.modifiedTime = modifiedTime;
    }

    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
        this.modifiedTime = new Date(); // 更新修改时间
    }

    public String getReviewStatus() {
        return reviewStatus;
    }

    public void setReviewStatus(String reviewStatus) {
        this.reviewStatus = reviewStatus;
    }

    public Date getNextReviewDate() {
        return nextReviewDate;
    }

    public void setNextReviewDate(Date nextReviewDate) {
        this.nextReviewDate = nextReviewDate;
    }
} 